% funtion for omega
function [omArray] = omega(l,n)

omArray = sparse(l,n);

k = (2*pi)/l;
for i=1:l
    for j=1:n
        om = sqrt((k*i).^2 + (k*j).^2);
        omArray(i,j) = om;
    end
end